package hr.fer.pus.dll_will.cr.actions;

import java.io.IOException;

import javax.servlet.ServletOutputStream;
import javax.servlet.http.HttpServletRequest;

import hr.fer.pus.dll_will.cr.IActionHandler;

public class GetCRCertificate implements IActionHandler {

	private String crPublicKey;
	
	public GetCRCertificate(String crpk){
		this.crPublicKey = crpk;
	}
	
	@Override
	public boolean performAction(ServletOutputStream out,
			HttpServletRequest request) throws IOException {
		
		System.out.println("CR: returning CA");
		out.write(crPublicKey.getBytes());
		
		return true;
	}

}
